/**
 * @Title: MyAuthenticator.java
 * @Package com.sunbeam.common.utils.mail
 * @Description: TODO
 * @author lyz lyzpoq_gmail_com
 * @date 2013/09/26 15:54:39
 * @version V1.0
 */

package com.sunbeam.common.utils.mail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * @ClassName: MyAuthenticator
 * @Description: TODO
 * @author lyz lyzpoq_gmail_com
 * @date 2013/09/26 15:54:39
 */

public class MyAuthenticator extends Authenticator {
    String userName=null;   
    String password=null;   
        
    public MyAuthenticator(){   
    } 
    
    /**
     * 
     *Title: 
     *Description: 
     * @param username
     * @param password
     */
    public MyAuthenticator(String username, String password) {    
        this.userName = username;    
        this.password = password;    
    }  
    
    /**
     * 
     * @Title: getPasswordAuthentication
     * @Description: TODO
     * @param @return
     * @return PasswordAuthentication
     * @throws
     */
    @Override
	protected PasswordAuthentication getPasswordAuthentication(){   
        return new PasswordAuthentication(userName, password);   
    }
    
}

